Add PumpSwap BuyExactQuoteIn trades - #9834
Conversation
PR SummaryMedium Risk Overview
Registers Reviewed by Cursor Bugbot for commit 774a9a1. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Instruction join omits inner index
- Added COALESCE(i.inner_instruction_index, 0) = COALESCE(e.evt_inner_instruction_index, 0) to the instruction_calls join so each BuyEvent matches exactly one CPI invocation.
- ✅ Fixed: Missing instruction_calls prefix predicate
- Added executing_account_prefix = 'pA' to the instruction_calls join for partition pruning, matching sibling PumpSwap models.
Or push these changes by commenting:
@cursor push 6e66369adb
Preview (6e66369adb)
diff --git a/dbt_subprojects/solana/models/_sector/dex/pumpswap/staging/pumpswap_solana_stg_decoded_swaps.sql b/dbt_subprojects/solana/models/_sector/dex/pumpswap/staging/pumpswap_solana_stg_decoded_swaps.sql
--- a/dbt_subprojects/solana/models/_sector/dex/pumpswap/staging/pumpswap_solana_stg_decoded_swaps.sql
+++ b/dbt_subprojects/solana/models/_sector/dex/pumpswap/staging/pumpswap_solana_stg_decoded_swaps.sql
@@ -96,7 +96,9 @@
ON i.block_date = e.evt_block_date
AND i.tx_id = e.evt_tx_id
AND i.outer_instruction_index = e.evt_outer_instruction_index
+ AND COALESCE(i.inner_instruction_index, 0) = COALESCE(e.evt_inner_instruction_index, 0)
AND i.executing_account = 'pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA'
+ AND i.executing_account_prefix = 'pA'
AND bytearray_substring(i.data, 1, 8) = 0xc62e1552b4d9e870
AND i.tx_success
LEFT JOIN {{ source('pumpdotfun_solana', 'pump_amm_call_buy') }} cYou can send follow-ups to the cloud agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 774a9a1. Configure here.
c7aca88 to
43a90d4
Compare
jeff-dude
left a comment
There was a problem hiding this comment.
proactive approval with revert needed
{# TEMP CI scope: revert begin to protocol_begin before merge. #}
this one will take awhile to run on deploy


Adds PumpSwap
BuyExactQuoteIntrades to the existingpumpswap_solana_base_trades_backfillpath, sourced fromBuyEvent.BuyExactQuoteIn(0xc62e1552b4d9e870) is present on-chain in raw instruction data but is not decoded intopump_amm_call_buy; the emittedBuyEventcarries the actual amounts.The model anti-joins existing
pump_amm_call_buyrows to avoid double-counting legacyBuycoverage while preserving the existing call-backed trade path.Impact
Since
2025-11-01, this covers an additional208,873,603PumpSwap trades and$11.24Bin volume.That is a
+42.05%trade-count uplift and+37.42%USD-volume uplift over current same-period PumpSwap coverage. Relative to current all-time PumpSwap coverage, it adds+16.83%more trades and+11.85%more USD volume.CUR2-1699